<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>errorPage</title>
    <link rel="stylesheet" href="../css/error.css" th:href="@{/css/error.css}">
</head>
<body onload="GetRequest()">

    <div class="da-wrapper">
        <div class="da-content">
            <div class="da-container clearfix">
                <div class="da-error-wrapper">
                    <div class="da-error-pin"></div>
                    <div class="da-error-code">
                        <p class="tip" id="error">status 404</p>
                        <p class="tip2">服务器开小差了</p>
                        <p class="tip3" id="errorText">You don't have permission to access the URL on this server.</p>
                    </div>
                    <h1 class="da-error-heading">Sorry, 请稍后再试 !!!</h1>
                </div>
            </div>
        </div>
    </div>

<Script language="javascript">
    // 显示错误类型
    function GetRequest() {
        // 获取url中"?"符后的字串
        let url = location.search;
        if (url == "?parameter%20invalid") {
            document.getElementById("errorText").innerHTML = "参数非法";
            document.getElementById("error").innerHTML = "error";
        }
        if (url == "?wrong%20username%20or%20password") {
            document.getElementById("errorText").innerHTML = "用户名或密码错误";
            document.getElementById("error").innerHTML = "error";
        }
    }
</script>
</body>
</html>